package net.xdclass.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.xdclass.model.CouponRecordDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CouponRecordMapper extends BaseMapper<CouponRecordDO> {


    /**
     * 批量更新优惠券使用记录
     * @param userId
     * @param useState
     * @param lockCouponRecordIds
     * @return
     */
    // int lockUseStateBatch(Long id, String name, List<Long> lockCouponRecordIds);
    int lockUseStateBatch(@Param("userId") Long userId, @Param("useState") String useState, @Param("lockCouponRecordIds") List<Long> lockCouponRecordIds);


    /**
     * 更新优惠券使用记录
     * @param couponRecordId
     * @param useState
     */
    void updateState(@Param("couponRecordId") Long couponRecordId, @Param("useState") String useState);

}
